package com.mooc.lib_video.ui.home_video

import com.mooc.lib_network.entity.BaseRepository
import com.mooc.lib_network.entity.NetResult
import com.mooc.lib_network.entity.RetrofitSingle
import com.mooc.lib_video.ApiService
import com.mooc.lib_common.model.HomeFeedEntity

class VideoRepo : BaseRepository(){

    //获取列表数据
    suspend fun callFeed() : NetResult<HomeFeedEntity>{
        return requestCall(call = {requestFeed()})
    }
    //model层中获取列表数据
    private suspend fun requestFeed(): NetResult<HomeFeedEntity> {
        return handlerResponse(
            RetrofitSingle.instance().getRetrofit().create(ApiService::class.java)
                .requestHomeList(0,"all",12,0)
        )
    }

}